<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    1.数组和字符串联合操作:数组项里面存在对象结构
    2.字符串的方法
    3.字符串的作用
    <script>
        var arr=[
            {
                name:"zhangsan",
                age:12
            },
            {
                name:"lisi",
                age:18
            },
            {
                name:"wangwu",
                age:12
            },
            {
                name:"周培训",
                age:17
            }
        ]
        console.log(arr[0].name);
        console.log(arr[0]["name"]);
        console.log(arr[2]["name"]);
    </script>

    操作方向:
    **如果是数组通过索引(中括号)
    如果是独享,通过属性名(中括号或者.)
    <script>
        var data={
            "result": [
                ["14promax手机壳","30674.885172615137" ],
                ["14pro手机壳","42757.943897979494"],
                ["14pro","5975.101501435998"],
                ["14promax","337679.9964928508"],
                ["14手机壳","15819.392859233245"],
                ["14plus手机壳","12524.747366225096"],
                [ "14pm手机壳","15686.283433841787"],
                [ "14pro苹果手机壳","436445.84207589284"],
                ["14寸电脑包", "14030.217446270544"],
                ["14ultra手机壳", "11977.582169268693"]
            ],
            "magic": [
                {
                    "index": "9",
                    "type": "tag_group",
                    "data": [
                        [
                            {
                                "title": "背包",
                                "type": "hot"
                            },
                            {
                                "title": "斜挎包"
                            },
                            {
                                "title": "公文包",
                                "type": "cold"
                            }
                        ],
                        [
                            {
                                "title": "单肩包"
                            },
                            {
                                "title": "双肩",
                                "type": "hot"
                            }
                        ],
                        [
                            {
                                "title": "苹果"
                            },
                            {
                                "title": "笔记本"
                            },
                            {
                                "title": "三星"
                            },
                            {
                                "title": "简约",
                                "type": "hot"
                            },
                            {
                                "title": "Dell/戴尔"
                            }
                        ]
                    ]
                },
                {
                    "index":3,
                    "data":[{
                        "name":"迪丽热巴"
                    }]
                },
                {
                    "index":4,
                    "data":[{
                        "name":"古力娜扎"
                    }]
                }
            ]
        }
        console.log(data.magic[1].data[0].name);//迪丽热巴
        console.log(data.magic[0].data[2][3].title);
    </script>
</body>
</html>